This invention relates to a signal processing apparatus for recording or reproduction of digital motion pictures by compressing those pictures at a high efficiency, more particularly to a motion picture recording/reproduction apparatus enabling high quality pictures to be recorded when a start recording command is received, using a recording method with compression based on reference data that uses pictures recorded both before and after the start recording command.
The standard H.262 (referred to herein as xe2x80x9cMPEG2xe2x80x9d) provides a known method for compressing motion pictures and audio. The standard is described in the ITU-T White Book, xe2x80x9cAudio Visual/Multimedia Related (H series) Recommendationsxe2x80x9d (its translation was issued by Nihon ITU Kyokai, Feb. 18, 1995).
According to the MPEG2 method, a motion picture frame (or picture) is divided into rectangular blocks referred to as macro blocks. Each block typically comprises 16xc3x9716 pixels. Then, a region, referred to as a reference region, having a close resemblance to an object macro block to be compressed is extracted from pictures positioned both before and after the object picture. The differential from the orientation (motion vector) of the reference region, as well as the difference data between the reference region and the object region are computed. Those data are then compressed to a bit stream through DCT (discrete cosine transformation) and variable length compression processing. Such a method for compressing only the motion vector and the difference information is more efficient for compressing data than other methods for compressing the original pictures themselves. Thus, this method compresses data into a smaller amount of bit stream volume for a given amount of allowable compression. Pictures compressed by such difference data cannot be decompressed without a reference picture. Thus a picture that does not reference any other pictures must be provided periodically. To enable data decompression to be performed at an intermediate point of a bit stream (herein xe2x80x9crandom accessxe2x80x9d) such reference pictures must be provided periodically. A picture which does not reference other pictures is referred to as an xe2x80x9cI-picturexe2x80x9d (Intra Picture). Such an I-picture is used as a reference picture, thereby permitting compression of later pictures. Then, a compressed picture can be used as another reference picture for compressing subsequent pictures one after another.
Pictures compressed with reference to other pictures are classified into P-pictures (Predictive-coded pictures) and B-pictures (Bi-directionally predictive-coded pictures). A P-picture uses a reference picture positioned only before the object picture, while a B-picture uses pictures positioned both before and after the object picture. Just like the I-picture, the P-picture can be used as a reference picture for other pictures.
FIG. 17 illustrates a configuration of motion picture frames compressed using I, P, and B pictures. In FIG. 17, reference numeral 121 indicates a picture type configuration composed in ascending order of input pictures. Picture types are compressed in units of 4 pictures in the order B, I, B, and P for pictures entered in ascending order of 1, 2, . . . 8. A picture at the base end of an arrow is used as a reference picture for compressing the picture at the arrow point end of the arrow. As shown, the B pictures reference both I and P pictures positioned before and after the B picture. The P picture references an I picture positioned before the P picture. These relationships are shown by the arrows in FIG. 17. In this example, it is possible to start data expansion at each of the I pictures indicated by frames 2 and 6. According to the MPEG method, a GOP (group of pictures) can be composed of a series of pictures comprising an I picture and other pictures directly and indirectly referenced by the I picture. A GOP header is added to each GOP. The GOP is used as a unit of random access.
Because data compression, when using B pictures, uses pictures positioned before and after the object picture as reference pictures, the order of input pictures, as well as the order of pictures in each bit stream resulting from the compression is changed.
FIG. 17 illustrates a configuration of input pictures 121 (top row) and the configuration of compressed pictures 122 (bottom row) recorded in the MPEG2 format bit stream. In this example, the picture 3, a B picture, is compressed by referencing both the I and P pictures positioned before and after it. Picture 3 is thus compressed after picture 4 is compressed. Accordingly, in the resulting bit stream the picture 3 is disposed after the picture 4.
Because the compression ratio differs among picture types for motion pictures including these I, P, and B picture types, the pictures must be controlled so that a proper amount of compression is assured for each picture type, thereby storing pictures with uniform quality. The amount of compression is changed significantly according to the characteristics of an input picture. For example, for motion pictures, the compression ratio is improved significantly if a motion vector is used for referencing a picture. It is thus possible to compress pictures with uniform quality if the amount of compression is allocated less for P and B pictures, and more for an I picture. If motion pictures to be compressed have many regions whose shapes are changed with time, the compression ratio is not raised even when a motion vector is used. Such a control method is disclosed in xe2x80x9cISO-IEC/JTC1/SC20/WG11 Coded Representation of Picture and Audio Information Test Model 5,xe2x80x9d which is one MPEG2 compression method. According to this model, the number of I, P, and B pictures to be compressed is temporarily determined before compression is started, then the amount of compression for the next GOP is decided from the result of the previous compression for each GOP. A coefficient (quantization coefficient) indicates the degree of compression.
Because compression methods of different types can be combined to encode pictures at a high compression ratio, it is possible to record a large number of motion picture frames in a disk medium such as a hard disk drive. For example, if MPEG2 is used for compressing the NTSC signal used for TV broadcasting, which includes about 200 Mbps data, the NTSC signal can be compressed up to about 4 Mbps. Thirty-three minutes of compressed data can be stored on a hard disk having a capacity of only one gigabyte, although the data can be stored only for 40 seconds before it is compressed. Consequently, the method makes it possible to record motion pictures on disk media instead of the conventional tapes used for recording motion pictures.
The MPEG2 methodology begins data expansion at an I picture. If a picture entered earlier than an I picture is compressed as a B picture, however, this B picture is disposed after the I picture in the resulting compressed bit stream. This B picture can also reference an I or P picture disposed before itself Such a recording method can be adopted for a portion of the motion picture preceding an event. If a bit stream is composed of pictures after this I picture and its subsequent pictures, there is a possibility that a picture that references a picture disposed before itself is included in the bit stream. If recording of pictures on a medium is started while such a B picture is fetched, the first picture in the bit stream will not be decompressed when reproduction is performed.
The present invention provides a motion picture recording apparatus that records motion pictures accurately even at the time a specified start recording command is received, because bit streams including pictures disposed before the start command are recorded. Preferably, the invention uses a compression method that compresses pictures disposed before and after an object picture as reference pictures.
This invention also provides a motion picture recording apparatus that can record data received before a start recording command, as well as data received after the start recording command, on a recording medium in an apparatus used for compressing and recording the motion pictures.
The present invention further provides a motion picture reproduction apparatus that reproduces pictures recorded after a start recording command is received by using the data recorded on a recording medium before the start recording command was received.
To achieve the above, the invention provides a motion picture recording/reproduction apparatus used to record compressed motion picture signals on a recording medium as described below.
When in a recording operation, a first mode (temporary recording mode) and a second mode (actual recording mode) are set before a recording start signal is received from an operator or another source. The first mode is used for pictures before the recording start signal is received, while the second mode is used for pictures after the recording start signal is received. The first and second modes are separated by the start recording operation. Of course, if desired, the recording and compression techniques can be changed between these modes depending upon the purpose of the recording.
According to the present invention, motion picture data are compressed and recorded on a recording medium in the first mode when a temporary start recording command is received. The timing of the start of the temporary recording can be set based on the purpose of the recording. The compressed data can be recorded on various recording media including a main memory, a cache memory, a semiconductor memory, a magnetic disk, etc., as provided in the apparatus.
Later, after the actual start recording command received from an operator or some other source directing the operation, motion picture data are compressed in the second mode. Although the MPEG method may be used for this compression, other motion picture compression methods may also be used. The pictures compressed in the second mode are then recorded on a recording medium, just as in the first mode. Just as in the first mode, any recording media can be used as appropriate to the recording purpose. The timing of the shift from the first mode to the second mode is also recorded at a specific region of the recording medium. This allows the operator or the source directing the operation to identify the recorded data from which the intended recording processing (second mode) is started in a reproduction operation.